﻿using Reuse.PCL.Services;
using System;
using System.Net.NetworkInformation;

namespace Reuse.WS.Services {

	/// <summary>
	/// Service to tell when the phone has network connection available
	/// </summary>
	public class NetworkService : INetworkService {

		/// <summary>
		/// Verifies if there is a network connection
		/// </summary>
		/// <returns>If network connection is available returns true, otherwise returns false</returns>
		public bool IsNetworkAvailable() {
			return NetworkInterface.GetIsNetworkAvailable();
		}
	}
}
